<?php

use Illuminate\Http\Request;
use \Illuminate\Http\Response;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
// ログインJWT不要
Route::middleware([
])->group(function () {
    //    自動請求

    Route::post('/ConfirmationController/selectYearMonth','ConfirmationController@selectYearMonth')->name('selectYearMonth');


});

// ログインJWT要
Route::middleware([
    'refresh.token'
])->group(function ()
{
    // 契約タイプを変更可能 契約先個別会社情報管理 劉鵬　end
    Route::post('/companyInformationOfGroup/editGroup','Auth\CompanyInfoOfGroupController@editGroup')->name('editGroupName.editGroup');

});

Route::prefix('auth')->group(function($router) {
    $router->post('login', 'AuthController@login');
    $router->post('logout', 'AuthController@logout');
    $router->post('isLogin', 'AuthController@isLogin');
    $router->post('roleAuth', 'AuthController@roleAuth');
    $router->post('LoginRoleAuth', 'AuthController@LoginRoleAuth');
    $router->post('accessCodeIsHave', 'Auth\ConstructionWasteController@accessCodeDecide');
    $router->post('accessCodeOk', 'Auth\ConstructionWasteController@accessCodeSuccess');
    $router->post('accessCodeHost', 'Auth\ConstructionWasteController@accessCodeHost');
    $router->post('initLogin', 'Auth\ConstructionWasteController@initLogin');
});
//Route::middleware('refresh.token')->group(function($router) {
//    $router->get('profile','AuthController@refresh');
//});
